package com.foodsafe.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.foodsafe.dao.AddivieinfoDao;
import com.foodsafe.model.Addivieinfo;
import com.foodsafe.util.PageInfo;

@Component("AddivieinfoService")
public class AddivieinfoService {
	
	private AddivieinfoDao addivieinfoDao;

	@Resource
	public void setAddivieinfoDao(AddivieinfoDao addivieinfoDao) {
		this.addivieinfoDao = addivieinfoDao;
	}

	public List<Addivieinfo> getAddivieinfo(PageInfo pageInfo) throws Exception {
		return addivieinfoDao.getAllAddivieinfo(pageInfo);
	}
	
	public List<Addivieinfo> getAddivieinfo(PageInfo pageInfo, String condition) throws Exception {
		return addivieinfoDao.getAllAddivieinfo(pageInfo, condition);
	}
	
	public String getAddivieinfoContent(int id) throws Exception {
		return addivieinfoDao.getAddivieinfoContent(id);
	}
}
